#include <stdio.h>

//https://www.nowcoder.com/practice/8b935f8ffe99445dbd42494febd13e45?tpId=290&tags=&title=&difficulty=0&judgeStatus=0&rp=0&sourceUrl=%2Fexam%2Foj%2Fta%3Fpage%3D1%26tpId%3D290%26type%3D290

int main() {
    int num = 6;
    for (int count = 1; count <= num + 1; count++) {
        for (int i = num - count + 1; i; i--) {
            printf(" ");
        }
        for (int i = 1; i <= 2 * count - 1; i++) {
            printf("*");
        }
        printf("\n");
    }
    for (int count = num; count; count--) {
        for (int i = num - count + 1; i; i--) {
            printf(" ");
        }
        for (int i = 1; i <= 2 * count - 1; i++) {
            printf("*");
        }
        printf("\n");
    }
    return 0;
}